package mrusanov.ui.management.buildings

import javax.swing.JPanel
import net.miginfocom.swing.MigLayout
import mrusanov.team.Club
import mrusanov.ui.{PanelBuilder, CentralPanel}

class BuildingsPanel(club:Club) extends CentralPanel {
  setLayout(new MigLayout("fill"))

  add(new ArenaPanel(club.buildings.arena))
  add(new HospitalPanel(club.buildings.hospital), "wrap")
  add(new JuniorsSchoolPanel(club.buildings.juniorsSchool))
  add(new TrainingBasePanel(club.buildings.trainingBase), "wrap")
  add(new MasseurRoomPanel(club.buildings.masseurRoom))
  add(new PsychologistRoomPanel(club.buildings.psychologistRoom))

  override def buildItself(panelBuilder:PanelBuilder) = panelBuilder.infra
}
